package vista;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VistaMenu extends javax.swing.JFrame {
	private JMenuBar jMenuBar1;
	private JMenuItem mIngrediente;
	private JMenuItem mVer;
	private JMenu m;
	private JMenuItem mOrden;
	private JMenuItem mProducto;
	private JMenuItem mCategoria;
	private JMenu jMenu1;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				VistaMenu inst = new VistaMenu();
				inst.setLocationRelativeTo(null);
				inst.setVisible(true);
			}
		});
	}
	
	public VistaMenu() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jMenuBar1 = new JMenuBar();
				setJMenuBar(jMenuBar1);
				{
					jMenu1 = new JMenu();
					jMenuBar1.add(jMenu1);
					jMenu1.setText("Registrar");
					{
						mCategoria = new JMenuItem();
						jMenu1.add(mCategoria);
						mCategoria.setText("Categoria");
					}
					{
						mIngrediente = new JMenuItem();
						jMenu1.add(mIngrediente);
						mIngrediente.setText("Ingrediente");
					}
					{
						mProducto = new JMenuItem();
						jMenu1.add(mProducto);
						mProducto.setText("Producto");
					}
					{
						mOrden = new JMenuItem();
						jMenu1.add(mOrden);
						mOrden.setText("Orden");
					}
				}
				{
					m = new JMenu();
					jMenuBar1.add(m);
					m.setText("Listados");
					{
						mVer = new JMenuItem();
						m.add(getMVer());
						mVer.setText("Ver");
					}
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}
	
	public JMenuItem getMVer() {
		return mVer;
	}
	
	public void addlistener(ActionListener actionlistener){
    	mCategoria.addActionListener(actionlistener);
    	mIngrediente.addActionListener(actionlistener);
    	mOrden.addActionListener(actionlistener);
    	mProducto.addActionListener(actionlistener);
    	mVer.addActionListener(actionlistener);
    }

}
